package flc.ast.utils;

import com.blankj.utilcode.util.GsonUtils;
import com.blankj.utilcode.util.SPUtils;
import com.google.gson.reflect.TypeToken;

import java.util.List;

import flc.ast.R;

public class AppSpUtils {
    private static final String SP_NAME = "appSp";
    private static final SPUtils sSpUtils = SPUtils.getInstance(SP_NAME);

    public static void saveTime1Bg(Integer bgIcon) {
        sSpUtils.put(Key.key_time1_bg, bgIcon);
    }

    public static Integer getTime1Bg() {
        return sSpUtils.getInt(Key.key_time1_bg, R.drawable.time_1);
    }

    public static void saveTime1Color(String color) {
        sSpUtils.put(Key.key_time1_color, color);
    }

    public static String getTime1Color() {
        return sSpUtils.getString(Key.key_time1_color, "#FFFFFF");
    }

    public static void saveTime1Frame(Integer bgIcon) {
        sSpUtils.put(Key.key_time1_frame, bgIcon);
    }

    public static Integer getTime1Frame() {
        return sSpUtils.getInt(Key.key_time1_frame, R.drawable.frame_1);
    }

    public static void saveTime2Bg(Integer bgIcon) {
        sSpUtils.put(Key.key_time2_bg, bgIcon);
    }

    public static Integer getTime2Bg() {
        return sSpUtils.getInt(Key.key_time2_bg, R.drawable.time_2_default);
    }

    public static void saveTime2Color(String color) {
        sSpUtils.put(Key.key_time2_color, color);
    }

    public static String getTime2Color() {
        return sSpUtils.getString(Key.key_time2_color, "#FFFFFF");
    }

    public static void saveTime2Frame(Integer bgIcon) {
        sSpUtils.put(Key.key_time2_frame, bgIcon);
    }

    public static Integer getTime2Frame() {
        return sSpUtils.getInt(Key.key_time2_frame, R.drawable.frame_1);
    }

    public static void saveTime3Bg(Integer bgIcon) {
        sSpUtils.put(Key.key_time3_bg, bgIcon);
    }

    public static Integer getTime3Bg() {
        return sSpUtils.getInt(Key.key_time3_bg, R.drawable.time_3_default);
    }

    public static void saveTime3Color(String color) {
        sSpUtils.put(Key.key_time3_color, color);
    }

    public static String getTime3Color() {
        return sSpUtils.getString(Key.key_time3_color, "#6F500A");
    }

    public static void saveTime3Frame(Integer bgIcon) {
        sSpUtils.put(Key.key_time3_frame, bgIcon);
    }

    public static Integer getTime3Frame() {
        return sSpUtils.getInt(Key.key_time3_frame, R.drawable.frame_1);
    }

    public static void saveTime4Bg(Integer bgIcon) {
        sSpUtils.put(Key.key_time4_bg, bgIcon);
    }

    public static Integer getTime4Bg() {
        return sSpUtils.getInt(Key.key_time4_bg, R.drawable.time_4_default);
    }

    public static void saveTime4Color(String color) {
        sSpUtils.put(Key.key_time4_color, color);
    }

    public static String getTime4Color() {
        return sSpUtils.getString(Key.key_time4_color, "#FFFFFF");
    }

    public static void saveTime4Frame(Integer bgIcon) {
        sSpUtils.put(Key.key_time4_frame, bgIcon);
    }

    public static Integer getTime4Frame() {
        return sSpUtils.getInt(Key.key_time4_frame, R.drawable.frame_1);
    }

    public static void saveTime5Bg(Integer bgIcon) {
        sSpUtils.put(Key.key_time5_bg, bgIcon);
    }

    public static Integer getTime5Bg() {
        return sSpUtils.getInt(Key.key_time5_bg, R.drawable.time_5_default);
    }

    public static void saveTime5Color(String color) {
        sSpUtils.put(Key.key_time5_color, color);
    }

    public static String getTime5Color() {
        return sSpUtils.getString(Key.key_time5_color, "#FFFFFF");
    }

    public static void saveTime5Frame(Integer bgIcon) {
        sSpUtils.put(Key.key_time5_frame, bgIcon);
    }

    public static Integer getTime5Frame() {
        return sSpUtils.getInt(Key.key_time5_frame, R.drawable.frame_1);
    }

    public static void saveTime6Bg(Integer bgIcon) {
        sSpUtils.put(Key.key_time6_bg, bgIcon);
    }

    public static Integer getTime6Bg() {
        return sSpUtils.getInt(Key.key_time6_bg, R.drawable.frame_1);
    }

    public static void saveTime6Color(String color) {
        sSpUtils.put(Key.key_time6_color, color);
    }

    public static String getTime6Color() {
        return sSpUtils.getString(Key.key_time6_color, "#333333");
    }

    public static void saveTime6Frame(Integer bgIcon) {
        sSpUtils.put(Key.key_time6_frame, bgIcon);
    }

    public static Integer getTime6Frame() {
        return sSpUtils.getInt(Key.key_time6_frame, R.drawable.frame_1);
    }

    public static void saveTime7Bg(Integer bgIcon) {
        sSpUtils.put(Key.key_time7_bg, bgIcon);
    }

    public static Integer getTime7Bg() {
        return sSpUtils.getInt(Key.key_time7_bg, R.drawable.frame_1);
    }

    public static void saveTime7Color(String color) {
        sSpUtils.put(Key.key_time7_color, color);
    }

    public static String getTime7Color() {
        return sSpUtils.getString(Key.key_time7_color, "#000000");
    }

    public static void saveTime7Frame(Integer bgIcon) {
        sSpUtils.put(Key.key_time7_frame, bgIcon);
    }

    public static Integer getTime7Frame() {
        return sSpUtils.getInt(Key.key_time7_frame, R.drawable.frame_1);
    }

    public static void saveTime8Bg(Integer bgIcon) {
        sSpUtils.put(Key.key_time8_bg, bgIcon);
    }

    public static Integer getTime8Bg() {
        return sSpUtils.getInt(Key.key_time8_bg, R.drawable.frame_2);
    }

    public static void saveTime8Color(String color) {
        sSpUtils.put(Key.key_time8_color, color);
    }

    public static String getTime8Color() {
        return sSpUtils.getString(Key.key_time8_color, "#000000");
    }

    public static void saveTime8Frame(Integer bgIcon) {
        sSpUtils.put(Key.key_time8_frame, bgIcon);
    }

    public static Integer getTime8Frame() {
        return sSpUtils.getInt(Key.key_time8_frame, R.drawable.frame_1);
    }

    public static void saveCountdown1Text(String text) {
        sSpUtils.put(Key.key_countdown1_text, text);
    }

    public static String getCountdown1Text() {
        return sSpUtils.getString(Key.key_countdown1_text, "距离生日");
    }

    public static void saveCountdown1Date(String date) {
        sSpUtils.put(Key.key_countdown1_date, date);
    }

    public static String getCountdown1Date() {
        return sSpUtils.getString(Key.key_countdown1_date, "");
    }

    public static void saveCountdown2Text(String text) {
        sSpUtils.put(Key.key_countdown2_text, text);
    }

    public static String getCountdown2Text() {
        return sSpUtils.getString(Key.key_countdown2_text, "距离国庆节");
    }

    public static void saveCountdown2Date(String date) {
        sSpUtils.put(Key.key_countdown2_date, date);
    }

    public static String getCountdown2Date() {
        return sSpUtils.getString(Key.key_countdown2_date, "");
    }

    public static void saveCountdown3Text(String text) {
        sSpUtils.put(Key.key_countdown3_text, text);
    }

    public static String getCountdown3Text() {
        return sSpUtils.getString(Key.key_countdown3_text, "除夕还有");
    }

    public static void saveCountdown3Date(String date) {
        sSpUtils.put(Key.key_countdown3_date, date);
    }

    public static String getCountdown3Date() {
        return sSpUtils.getString(Key.key_countdown3_date, "");
    }

    public static void saveCountdown4Text(String text) {
        sSpUtils.put(Key.key_countdown4_text, text);
    }

    public static String getCountdown4Text() {
        return sSpUtils.getString(Key.key_countdown4_text, "距离情人节");
    }

    public static void saveCountdown4Date(String date) {
        sSpUtils.put(Key.key_countdown4_date, date);
    }

    public static String getCountdown4Date() {
        return sSpUtils.getString(Key.key_countdown4_date, "");
    }

    public static void saveCountdown5Text(String text) {
        sSpUtils.put(Key.key_countdown5_text, text);
    }

    public static String getCountdown5Text() {
        return sSpUtils.getString(Key.key_countdown5_text, "距离妈妈的生日");
    }

    public static void saveCountdown5Date(String date) {
        sSpUtils.put(Key.key_countdown5_date, date);
    }

    public static String getCountdown5Date() {
        return sSpUtils.getString(Key.key_countdown5_date, "");
    }

    public static void saveCountdown6Text(String text) {
        sSpUtils.put(Key.key_countdown6_text, text);
    }

    public static String getCountdown6Text() {
        return sSpUtils.getString(Key.key_countdown6_text, "距离情人节");
    }

    public static void saveCountdown6Date(String date) {
        sSpUtils.put(Key.key_countdown6_date, date);
    }

    public static String getCountdown6Date() {
        return sSpUtils.getString(Key.key_countdown6_date, "");
    }

    public static void saveCountdown7Text(String text) {
        sSpUtils.put(Key.key_countdown7_text, text);
    }

    public static String getCountdown7Text() {
        return sSpUtils.getString(Key.key_countdown7_text, "距离考驾照");
    }

    public static void saveCountdown7Date(String date) {
        sSpUtils.put(Key.key_countdown7_date, date);
    }

    public static String getCountdown7Date() {
        return sSpUtils.getString(Key.key_countdown7_date, "");
    }

    public static void saveCountdown8Text(String text) {
        sSpUtils.put(Key.key_countdown8_text, text);
    }

    public static String getCountdown8Text() {
        return sSpUtils.getString(Key.key_countdown8_text, "考科目二");
    }

    public static void saveCountdown8Date(String date) {
        sSpUtils.put(Key.key_countdown8_date, date);
    }

    public static String getCountdown8Date() {
        return sSpUtils.getString(Key.key_countdown8_date, "");
    }

    interface Key {
        String key_time1_bg = "key_time1_bg";
        String key_time1_color = "key_time1_color";
        String key_time1_frame = "key_time1_frame";
        String key_time2_bg = "key_time2_bg";
        String key_time2_color = "key_time2_color";
        String key_time2_frame = "key_time2_frame";
        String key_time3_bg = "key_time3_bg";
        String key_time3_color = "key_time3_color";
        String key_time3_frame = "key_time3_frame";
        String key_time4_bg = "key_time4_bg";
        String key_time4_color = "key_time4_color";
        String key_time4_frame = "key_time4_frame";
        String key_time5_bg = "key_time5_bg";
        String key_time5_color = "key_time5_color";
        String key_time5_frame = "key_time5_frame";
        String key_time6_bg = "key_time6_bg";
        String key_time6_color = "key_time6_color";
        String key_time6_frame = "key_time6_frame";
        String key_time7_bg = "key_time7_bg";
        String key_time7_color = "key_time7_color";
        String key_time7_frame = "key_time7_frame";
        String key_time8_bg = "key_time8_bg";
        String key_time8_color = "key_time8_color";
        String key_time8_frame = "key_time8_frame";
        String key_countdown1_text = "key_countdown1_text";
        String key_countdown1_date = "key_countdown1_date";
        String key_countdown2_text = "key_countdown2_text";
        String key_countdown2_date = "key_countdown2_date";
        String key_countdown3_text = "key_countdown3_text";
        String key_countdown3_date = "key_countdown3_date";
        String key_countdown4_text = "key_countdown4_text";
        String key_countdown4_date = "key_countdown4_date";
        String key_countdown5_text = "key_countdown5_text";
        String key_countdown5_date = "key_countdown5_date";
        String key_countdown6_text = "key_countdown6_text";
        String key_countdown6_date = "key_countdown6_date";
        String key_countdown7_text = "key_countdown7_text";
        String key_countdown7_date = "key_countdown7_date";
        String key_countdown8_text = "key_countdown8_text";
        String key_countdown8_date = "key_countdown8_date";
        String key_component_list = "key_component_list";
    }
}
